<template>
	<view>
		<web-view :src="url" ></web-view>
	</view>
</template>

<script>
	var vm=this;
	 export default {
		 onNavigationBarButtonTap(e){
			 // #ifdef APP-PLUS
				let pages = getCurrentPages()
				let page = pages[pages.length - 1];  
				let currentPages = page.$getAppWebview()  
				let children=currentPages.children()  
				if(children.length===0){  
				           uni.navigateBack({
							   url: '/pages/Repayment/yulan_shanfu'
						   })  
				}else{  
				   children[0].close()  
				  setTimeout(()=>{  
				    uni.navigateBack()  
				  },80)  
				}
			 // #endif
			 // #ifdef H5
			 let pages1 = getCurrentPages()
			 for (var i = 0; i < pages1.length; i++) {
				 this.Back(1)
			 }
			 // #endif
		 },
	        data() {
	            return {
	                url:'',
					key: ''
	            }
	        },
			onBackPress(){
				uni.redirectTo({
					url: '/pages/Repayment/yulan_shanfu'
				})
				return true;
			},
			// onUnload() {
			// 	uni.switchTab({
			// 	    url: '/pages/index/index'
			// 	});
			// },
			onLoad(op) {
				this.url=op.url;
				this.key = op.key
				console.log(this.url)
			},
			onShow() {
				this.button_color = uni.getStorageSync('button_color');
			}
			
	    }
</script>

<style>
</style>
